package com.wish.blessingroad.controller;


import com.wish.blessingroad.common.ResponseResult;
import com.wish.blessingroad.entity.Blessing;
import com.wish.blessingroad.entity.Rewards;
import com.wish.blessingroad.service.IAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;

/**
 * <p>
 * 奖励记录表
 * </p>
 *
 * @author dhc
 * @since 2019-02-18
 */
@Controller
@RequestMapping("/blessingroad/rewards")
public class RewardsController {
    @Autowired
    private IAddressService addressServiceImpl;
    /**
     * 保存
     * 用来保存奖励的信息：用户，奖励什么，邀请，排行，用户收货地址id
     */
    @RequestMapping("/saveRewards")
    @ResponseBody
    public Object saveRewards(Rewards rewards) {
        //TODO 先查是否有此用户赠送记录，没有则保存，有则提示不能再奖励
        rewards.insert();
        return new ResponseResult<>("").success();
    }

    /**
     * 查询
     */


}

